home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 May: Tool Chest / Developer CD Series Tool Chest (Apple Computer)(May 1999).iso / Tool Chest / Development Kits / MPW etc / MPW-PR / Interfaces&Libraries / Multiprocessing StdCLib / CIncludes / errno.h next >
Encoding:
C/C++ Source or Header  |  1997-03-06  |  3.7 KB  |  124 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        errno.h
  3.  
  4.      Contains:    Error reporting macros
  5.  
  6.      Version:    Technology:    StdCLib 3.4
  7.                  Release:    3.6d2
  8.  
  9.      Copyright:    © 1987-1996 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        If you find a problem with this file, send the file and version
  12.                  information (from above) and the problem description to:
  13.  
  14.                      Internet:    apple.bugs@applelink.apple.com
  15.                      AppleLink:    APPLE.BUGS
  16.  
  17. */
  18. #ifndef __ERRNO__
  19. #define __ERRNO__
  20.  
  21. #ifndef __CONDITIONALMACROS__
  22. #include <ConditionalMacros.h>
  23. #endif
  24.  
  25.  
  26. #if PRAGMA_ONCE_SUPPORTED
  27. #pragma once
  28. #endif  /* PRAGMA_ONCE_SUPPORTED */
  29.  
  30. #ifdef __cplusplus
  31. extern "C" {
  32. #endif
  33.  
  34. #if PRAGMA_IMPORT_SUPPORTED
  35. #pragma import on
  36. #endif
  37.  
  38. #if PRAGMA_ALIGN_SUPPORTED
  39. #pragma options align=mac68k
  40. #elif PRAGMA_PACK_SUPPORTED
  41. #pragma pack(push, 2)
  42. #endif
  43.  
  44.  
  45.  
  46. /* ANSI specified declarations */
  47.  
  48. #define EDOM        33   /* Argument outside function domain    */
  49. #define ERANGE      34   /* Result is too large to represent    */
  50.  
  51. /* ****************** errno begin **************************** */
  52.  
  53. #if ( defined( USE_MP ) || defined( _POSIX_THREAD_SAFE_FUNCTIONS ) )    \
  54.     && ( defined( __powerc ) || defined( powerc ) )
  55.  
  56.     extern int* __geterrno( void );
  57.         /* __geterrno is an MP-safe accessor for errno */
  58.  
  59.     #define errno    (*__geterrno())
  60.  
  61. #else
  62.  
  63.     extern int errno;
  64.  
  65. #endif
  66.  
  67. /* **************** errno end ********************************* */
  68.  
  69. /* Mac specific declaration */
  70.  
  71. extern short MacOSErr;
  72.  
  73. /* Non-ANSI macro definitions */
  74.  
  75. #define EPERM        1   /* Operation not permitted             */
  76. #define ENOENT       2   /* No such file or directory           */
  77. #define ENORSRC      3   /* No such process                     */
  78. #define EINTR        4   /* Interrupted function call           */
  79. #define EIO          5   /* Input/Output error                  */
  80. #define ENXIO        6   /* No such device or address           */
  81. #define E2BIG        7   /* Argument list too long              */
  82. #define ENOEXEC      8   /* File not in executable format       */
  83. #define EBADF        9   /* Bad file descriptor (or number)     */
  84. #define ECHILD      10   /* No child process                    */
  85. #define EAGAIN      11   /* Resource temporarily unavailable    */
  86. #define ENOMEM      12   /* Not enough space                    */
  87. #define EACCES      13   /* File access permission denied       */
  88. #define EFAULT      14   /* Bad address as argument in call     */
  89. #define ENOTBLK     15   /* For backward compatibility          */
  90. #define EBUSY       16   /* System resource busy                */
  91. #define EEXIST      17   /* File already exists                 */
  92. #define EXDEV       18   /* Improper link attempted             */
  93. #define ENODEV      19   /* No such device                      */
  94. #define ENOTDIR     20   /* Pathname was not a directory        */
  95. #define EISDIR      21   /* Attempt to open directory for write */
  96. #define EINVAL      22   /* Invalid argument                    */
  97. #define ENFILE      23   /* Too many open files in system       */
  98. #define EMFILE      24   /* Too many open files in process      */
  99. #define ENOTTY      25   /* Inappropriate I/O control operation */
  100. #define ETXTBSY     26   /* Text file is busy                   */
  101. #define EFBIG       27   /* File too large                      */
  102. #define ENOSPC      28   /* No space left on device             */
  103. #define ESPIPE      29   /* Invalid seek                        */
  104. #define EROFS       30   /* Attempt to modify a read-only file  */
  105. #define EMLINK      31   /* Too many links on a single file     */
  106. #define EPIPE       32   /* Broken pipe; no process to read it  */
  107.  
  108. #if PRAGMA_ALIGN_SUPPORTED
  109. #pragma options align=reset
  110. #elif PRAGMA_PACK_SUPPORTED
  111. #pragma pack(pop)
  112. #endif
  113.  
  114. #if PRAGMA_IMPORT_SUPPORTED
  115. #pragma import off
  116. #endif
  117.  
  118. #ifdef __cplusplus
  119. }
  120. #endif
  121.  
  122. #endif /* __ERRNO__ */
  123.  
  124.